<?PHP  
if(extension_loaded('zlib')){//检查服务器是否开启了zlib拓展
	ob_start('ob_gzhandler');
}
header ("content-type: text/css; charset: utf-8");//注意修改到你的编码
header ("cache-control: must-revalidate");
$offset =60*60*24;//css文件的距离现在的过期时间，这里设置为一天
$expire ="expires: " . gmdate ("D, d M Y H:i:s", time()+ $offset) . " GMT";
header ($expire);
ob_start("compress");
function compress($buffer){//去除文件中的注释
	$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','', $buffer);
	return $buffer;
}

//ob_start();

/*the FTforum entrance */
//error_reporting(0);
error_reporting(E_ALL);
set_magic_quotes_runtime(0);
$mtime = explode(' ', microtime());
$starttime = $mtime[1] + $mtime[0];

define('IN_FENGTOP', TRUE);
define('FENGTOP_ROOT', dirname(__FILE__));

include_once FENGTOP_ROOT.'/model/FTindex.class.php';

$FTindex = new FTindex();

$FTindex->run();

//echo "<pre>";
//echo "Global:"; print_r($GLOBALS);
//echo "</pre>";

//ob_end_flush();
if(extension_loaded('zlib')){
	ob_end_flush();//输出buffer中的内容，即压缩后的css文件
}
?>
